package com.controller.setting;

import com.comm.R;
import com.comm.vo.HospitalinformationVo;
import com.entity.Hospitalinformation;
import com.entity.ProjectTable;
import com.service.setting.SystemHospitalinformationService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
@RequestMapping(value = "/setting/systemHospitalinformation")
@Controller
@Api(value = "诊所信息",tags = "诊所信息接口")
@ApiResponses({
        @ApiResponse(code=200,message="请求成功"),
        @ApiResponse(code=404,message="找不到页面"),
        @ApiResponse(code=403,message="请求禁止"),
        @ApiResponse(code=401,message="请求未授权"),
        @ApiResponse(code=500,message="后台服务错误")})
public class SystemHospitalinformation {
    @Autowired
    private SystemHospitalinformationService service;
//   1.6.1：查找诊所部分信息（这里某些字段需要动态获取，这里是查询）：
    @ResponseBody
    @RequestMapping(value ="/fundHospitalinformation",method = RequestMethod.GET)
    @ApiOperation(value = "查找诊所部分信息接口",notes = "查找诊所部分信息",httpMethod = "post", response = String.class)
    public  R fundHospitalinformation(){
        return service.fundHospitalinformation();
    }
//1.6.2：编辑诊所信息：
    @ResponseBody
    @RequestMapping(value ="/addHospitalinformation",method = RequestMethod.POST)
    @ApiOperation(value = "编辑诊所信息的接口",notes = "编辑诊所信息",httpMethod = "post", response = String.class)
    @ApiImplicitParam(name = "projectName",value = "名称",required = true,dataType = "string",paramType = "query")
    public  R addHospitalinformation(@RequestBody@ApiParam("hospitalinformation") HospitalinformationVo hospitalinformation){

        return service.addHospitalinformation(hospitalinformation);
    }
//   1.6.3：查询有哪些科室：（动态获取）
    @ResponseBody
    @RequestMapping(value ="/fundAdministratives",method = RequestMethod.GET)
    @ApiOperation(value = "查询有哪些科室的接口",notes = "查询有哪些科室",httpMethod = "post", response = String.class)
    public  R fundAdministrative(){
        return service.showDisposition();
    }
}
